//
//  VerticalTwoToneView.m
//  SKPAD
//
//  Created by admin@amonline.com.cn on 15/5/5.
//  Copyright (c) 2015年 amo. All rights reserved.
//

#import "VerticalThreeToneView.h"
#import "VerticalThreeToneSlip.h"

@implementation VerticalThreeToneView
//托空间初始化
-(void)awakeFromNib{
    [self setchushihua];
}

//代码创建初始化
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    [self setchushihua];
    return  self;
}

-(void)setchushihua{
    _kd = 20;
    _slip = [[VerticalThreeToneSlip alloc]init];
    _slip.backgroundColor = [UIColor clearColor];
    [self insertSubview:_slip atIndex:2];
}


//重绘方法
-(void)drawRect:(CGRect)rect{
    [self draw_scdcdt:rect];
}

//添加上层,中间层，底层
-(void)draw_scdcdt:(CGRect)rect{
    _slip.frame = rect;
    //宽度，值，宽度

}



-(void)setKd:(float)kd{
    _kd = kd>20?20:kd;
    [self setNeedsDisplay];
}
-(void)setZ:(float)z{
    _z = z;
    [self setNeedsDisplay];
}
@end